FIG. 9 is a configuration diagram of a network that includes a transmission device that capsules a frame. A frame transmitted and received to and from a terminal device 1500 is coupled to an Ether over Sonet (EOS)/Packet over Sonet (POS) transmission device 1502 through an Ether/Internet Protocol (IP) network 1501. The EOS/POS transmission device 1502 is coupled to a wide area network such as a Synchronous Digital Hierarchy (SDH) network 1503 through an SDH transmission device 1504.
The EOS/POS transmission device 1502, which has an EOS function and a POS function, capsules a frame and/or a packet by General Framing Procedure (GFP) or Link Access Procedure for SDH (LAPS) to store an Ether Frame or an IP Packet in a payload of SDH/Sonet. Although capsuling by the GFP has been practiced generally, there are many devices that support simply the LAPS.
The GFP and the LAPS play a role mainly in reporting a start position and an end position of a frame. The GFP performs processing for detecting the start position of the frame based on a Header Error Check (HEC). The end position of the frame may be detected by a Payload Length Indicator (PLI) in the header. In the LAPS, the start position of the frame is recognized by a code “0x7E.” By the code “0x7E” detected after the start position is recognized, the end position of the frame is recognized.
In the LAPS, if the code “0x7E” is included in a payload, the frame end position may not be detected accurately. Therefore, if the code “0x7E” is included in the payload, the code is preferably converted into another code. For example, there is a device that employs a method of inserting 0 (bit stuffing) if 5 bits of 1 are in succession in data of the payload. For example, there is a device that employs a method of converting (byte stuffing) to code into “0x7D, 0x5E” if the code“0x7E” is detected. (0x7E is indicated as “01111110” in binary, so that 6 bits of 1 are in succession, and the code is converted into another code by bit stuffing most of the time if not always). The technique disclosed in Japanese Laid-open Patent Publication No. 09-305509 includes a format converting circuit that converts bit stuffing data (for example, High-Level Data Link Control (HDLC) framing data) data into byte stuffing data as byte-circuit data.